Optimal. Leaf size=40 \[ -\frac {b c}{\sqrt {x}}+b c^2 \tanh ^{-1}\left (c \sqrt {x}\right )-\frac {a+b \tanh ^{-1}\left (c \sqrt {x}\right )}{x} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 40, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {6037, 53, 65,
212} \begin {gather*} -\frac {a+b \tanh ^{-1}\left (c \sqrt {x}\right )}{x}+b c^2 \tanh ^{-1}\left (c \sqrt {x}\right )-\frac {b c}{\sqrt {x}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 53
Rule 65
Rule 212
Rule 6037
Rubi steps
\begin {align*} \int \frac {a+b \tanh ^{-1}\left (c \sqrt {x}\right )}{x^2} \, dx &=-\frac {a+b \tanh ^{-1}\left (c \sqrt {x}\right )}{x}+\frac {1}{2} (b c) \int \frac {1}{x^{3/2} \left (1-c^2 x\right )} \, dx\\ &=-\frac {b c}{\sqrt {x}}-\frac {a+b \tanh ^{-1}\left (c \sqrt {x}\right )}{x}+\frac {1}{2} \left (b c^3\right ) \int \frac {1}{\sqrt {x} \left (1-c^2 x\right )} \, dx\\ &=-\frac {b c}{\sqrt {x}}-\frac {a+b \tanh ^{-1}\left (c \sqrt {x}\right )}{x}+\left (b c^3\right ) \text {Subst}\left (\int \frac {1}{1-c^2 x^2} \, dx,x,\sqrt {x}\right )\\ &=-\frac {b c}{\sqrt {x}}+b c^2 \tanh ^{-1}\left (c \sqrt {x}\right )-\frac {a+b \tanh ^{-1}\left (c \sqrt {x}\right )}{x}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.02, size = 67, normalized size = 1.68 \begin {gather*} -\frac {a}{x}-\frac {b c}{\sqrt {x}}-\frac {b \tanh ^{-1}\left (c \sqrt {x}\right )}{x}-\frac {1}{2} b c^2 \log \left (1-c \sqrt {x}\right )+\frac {1}{2} b c^2 \log \left (1+c \sqrt {x}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.07, size = 62, normalized size = 1.55
method | result | size |
derivativedivides | \(2 c^{2} \left (-\frac {a}{2 c^{2} x}-\frac {b \arctanh \left (c \sqrt {x}\right )}{2 c^{2} x}-\frac {b \ln \left (c \sqrt {x}-1\right )}{4}+\frac {b \ln \left (1+c \sqrt {x}\right )}{4}-\frac {b}{2 c \sqrt {x}}\right )\) | \(62\) |
default | \(2 c^{2} \left (-\frac {a}{2 c^{2} x}-\frac {b \arctanh \left (c \sqrt {x}\right )}{2 c^{2} x}-\frac {b \ln \left (c \sqrt {x}-1\right )}{4}+\frac {b \ln \left (1+c \sqrt {x}\right )}{4}-\frac {b}{2 c \sqrt {x}}\right )\) | \(62\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.26, size = 51, normalized size = 1.28 \begin {gather*} \frac {1}{2} \, {\left ({\left (c \log \left (c \sqrt {x} + 1\right ) - c \log \left (c \sqrt {x} - 1\right ) - \frac {2}{\sqrt {x}}\right )} c - \frac {2 \, \operatorname {artanh}\left (c \sqrt {x}\right )}{x}\right )} b - \frac {a}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.36, size = 53, normalized size = 1.32 \begin {gather*} -\frac {2 \, b c \sqrt {x} - {\left (b c^{2} x - b\right )} \log \left (-\frac {c^{2} x + 2 \, c \sqrt {x} + 1}{c^{2} x - 1}\right ) + 2 \, a}{2 \, x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 231 vs.
\(2 (36) = 72\).
time = 3.39, size = 231, normalized size = 5.78 \begin {gather*} \begin {cases} - \frac {a}{x} + \frac {b \operatorname {atanh}{\left (\sqrt {x} \sqrt {\frac {1}{x}} \right )}}{x} & \text {for}\: c = - \sqrt {\frac {1}{x}} \\- \frac {a}{x} - \frac {b \operatorname {atanh}{\left (\sqrt {x} \sqrt {\frac {1}{x}} \right )}}{x} & \text {for}\: c = \sqrt {\frac {1}{x}} \\- \frac {a c^{2} x^{\frac {3}{2}}}{c^{2} x^{\frac {5}{2}} - x^{\frac {3}{2}}} + \frac {a \sqrt {x}}{c^{2} x^{\frac {5}{2}} - x^{\frac {3}{2}}} + \frac {b c^{4} x^{\frac {5}{2}} \operatorname {atanh}{\left (c \sqrt {x} \right )}}{c^{2} x^{\frac {5}{2}} - x^{\frac {3}{2}}} - \frac {b c^{3} x^{2}}{c^{2} x^{\frac {5}{2}} - x^{\frac {3}{2}}} - \frac {2 b c^{2} x^{\frac {3}{2}} \operatorname {atanh}{\left (c \sqrt {x} \right )}}{c^{2} x^{\frac {5}{2}} - x^{\frac {3}{2}}} + \frac {b c x}{c^{2} x^{\frac {5}{2}} - x^{\frac {3}{2}}} + \frac {b \sqrt {x} \operatorname {atanh}{\left (c \sqrt {x} \right )}}{c^{2} x^{\frac {5}{2}} - x^{\frac {3}{2}}} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 168 vs.
\(2 (34) = 68\).
time = 0.43, size = 168, normalized size = 4.20 \begin {gather*} 2 \, {\left (\frac {{\left (c \sqrt {x} + 1\right )} b c \log \left (-\frac {c \sqrt {x} + 1}{c \sqrt {x} - 1}\right )}{{\left (c \sqrt {x} - 1\right )} {\left (\frac {{\left (c \sqrt {x} + 1\right )}^{2}}{{\left (c \sqrt {x} - 1\right )}^{2}} + \frac {2 \, {\left (c \sqrt {x} + 1\right )}}{c \sqrt {x} - 1} + 1\right )}} + \frac {\frac {2 \, {\left (c \sqrt {x} + 1\right )} a c}{c \sqrt {x} - 1} + \frac {{\left (c \sqrt {x} + 1\right )} b c}{c \sqrt {x} - 1} + b c}{\frac {{\left (c \sqrt {x} + 1\right )}^{2}}{{\left (c \sqrt {x} - 1\right )}^{2}} + \frac {2 \, {\left (c \sqrt {x} + 1\right )}}{c \sqrt {x} - 1} + 1}\right )} c \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.12, size = 52, normalized size = 1.30 \begin {gather*} b\,c\,\mathrm {atan}\left (\frac {c^2\,\sqrt {x}}{\sqrt {-c^2}}\right )\,\sqrt {-c^2}-\frac {a}{x}-\frac {b\,\mathrm {atanh}\left (c\,\sqrt {x}\right )+b\,c\,\sqrt {x}}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________